PROJECT(libjs)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_C_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g3 -ggdb")
SET(CMAKE_C_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
INCLUDE_DIRECTORIES(include)
AUX_SOURCE_DIRECTORY(. DIR_JS_SRCS)
AUX_SOURCE_DIRECTORY(./core DIR_CORE_SRCS)
AUX_SOURCE_DIRECTORY(./eval DIR_EVAL_SRCS)
AUX_SOURCE_DIRECTORY(./init DIR_INIT_SRCS)
AUX_SOURCE_DIRECTORY(./parse DIR_PARSE_SRCS)
AUX_SOURCE_DIRECTORY(./sys DIR_SYS_SRCS)
AUX_SOURCE_DIRECTORY(./util DIR_UTIL_SRCS)
AUX_SOURCE_DIRECTORY(./vm DIR_VM_SRCS)
ADD_LIBRARY(js STATIC ${DIR_JS_SRCS} ${DIR_CORE_SRCS} 
	${DIR_EVAL_SRCS} ${DIR_PARSE_SRCS} ${DIR_SYS_SRCS} 
	${DIR_UTIL_SRCS} ${DIR_VM_SRCS} ${DIR_INIT_SRCS})